package com.example.prodecttest.controller;

import com.example.prodecttest.result.Result;
import com.example.prodecttest.result.Results;
import com.example.prodecttest.service.EquipmentTypeService;
import com.example.prodecttest.vo.EquipmentTypeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.example.prodecttest.result.Results.ok;

/**
 * @description:
 * @author: fan
 * @date: 2022/2/18 10:27
 * @version: 1.0
 */
@Api(tags = "equipment--设备" )
@RestController
@RequestMapping("/equipment")
public class EquipmentController {

    @Resource
    private EquipmentTypeService equipmentTypeService;


    @GetMapping(value = "addEquipment")
    @ApiOperation(value = "添加设备", notes = "添加设备")
    public Result<EquipmentTypeVO> addEquipment(Long equipmentType){

        return Results.ok(equipmentTypeService.getEquipmentAttribute(equipmentType));
    }

}
